<?php $this->load->view('header', $head); ?>
<div data-role="page" id="page-high-access">
	<div data-role="header">
		<a href="<?=site_url('admin')?>" data-icon="home" data-iconpos="notext" data-direction="reverse" class="ui-btn-right jqm-home">Home</a>
		<h1>설문 현황</h1>
	</div><!-- /header -->
	<div data-role="content" >
		<div class="content-primary">		<!-- start of content-primary -->
			<ul data-role="listview">
				<?php if(!empty($poll_list)){ foreach($poll_list as $k => $i): ?>
				<?php 
						  $buff = strtotime($i->poll_end);
						 	 if(time() > strtotime($i->poll_end)) : ?> 	<!-- expired polls have different list element color -->
				<li data-theme = "e"><a href="<?=site_url('poll/result/$i->id')?>">						
							<?php else :?>				                <!-- ongoing polls -->          
				<li data-theme = "c">
					<input type="hidden" class="poll-opt" value="<?=$i->id?>;<?=$i->mid_show?>" />
					<a href = "#"> 
							<?php endif;?>
		
					<h3><?=$i->title?></h3>								<!-- print out poll information -->
					<p><strong><?=$i->keyword?></strong></p>
					<p><?=$i->poll_start?> ~ <?=$i->poll_end?></p>
					<p><strong>설문 조회 수 : <?=$i->view_count?></strong></p>
					<p class="ui-li-aside"><strong><?=category_str($i->category)?></strong></p>
				
				</a></li>
				<?php endforeach; }?>
		</ul>
		</div><!--/content-primary -->		
		
	</div><!-- /content -->
	<div data-role="footer" data-position="fixed" data-theme="a">
		<?php $this->load->view('navbar', array('active'=>'admin')) ?>
	</div><!-- /footer -->
</div><!-- /page -->			
			
<?php $this->load->view('footer'); ?>